package collections.g2;

import java.util.PriorityQueue;
import java.util.Queue;

public class PriorityQueueDemo {

	public static void main(String[] args) {
		
		Queue<Kunde> kunden = 
				new PriorityQueue<Kunde>();
		
		kunden.add(new Kunde(12));
		kunden.add(new Kunde(7));
		kunden.add(new Kunde(17));
		kunden.add(new Kunde(22));
		kunden.add(new Kunde(1));
		
		while(!kunden.isEmpty()){
			System.out.println(kunden.poll());
		}
		
		
		
	}
}
